package com.kgc.It;

public class It {
    private String name;
    private int gae;
    private String technology;
    private int work;
    private  String unit;
    private String  position;
    public It(){

    }
    public It( String name,int gae,int work,String unit,String position){
        this.name=name;
        this.gae=gae;
        this.work=work;
        this.unit=unit;
        this.position=position;
    }
    public void report(){
        System.out.println("姓名"+this.name+"年龄"+this.gae+"技术方向"+this.getTechnology()+
                "工作年限"+this.work+"工作单位"+this.unit+"职务"+this.position);

    }
    public String getName(){
        return this.name;
    }
    public void setName(String name) { this.name = name; }

    public int getGae(){return this.gae; }
    public void setGae(int gae) {
        if (gae>15){this.gae = gae;}
        else {this.gae=15;
            throw new RuntimeException("年龄要大于15");}
    }

    public String getTechnology(){return this.technology="吹牛"; }

    public int getWork() { return work; }
    public void setWork(int work) { this.work = work; }

    public String getUnit() { return this.unit; }
    public void setUnit(String unit) { this.unit = unit; }

    public String getPosition() { return this.position; }

    public void setPosition(String position) { this.position = position; }}


